package com.sinosoft.front.service;

import java.rmi.RemoteException;

import com.sinosoft.front.busInterface.xsd.CarActualPriceQueryCheckInterface;
import com.sinosoft.front.busInterface.xsd.CarActualPriceQueryInterface;
import com.sinosoft.front.dto.xsd.CarActualPriceQueryRequest;
import com.sinosoft.front.dto.xsd.CarActualPriceQueryResponse;
import com.sinosoft.front.dto.xsd.VehicleModelQueryResponse;

public class CarActualPriceQueryServicePortTypeProxy implements
		com.sinosoft.front.service.CarActualPriceQueryServicePortType {
	private String _endpoint = null;
	private com.sinosoft.front.service.CarActualPriceQueryServicePortType carActualPriceQueryServicePortType = null;

	public CarActualPriceQueryServicePortTypeProxy() {
		_initCarActualPriceQueryServicePortTypeProxy();
	}

	public CarActualPriceQueryServicePortTypeProxy(String endpoint) {
		_endpoint = endpoint;
		_initCarActualPriceQueryServicePortTypeProxy();
	}

	private void _initCarActualPriceQueryServicePortTypeProxy() {
		try {
			carActualPriceQueryServicePortType = (new com.sinosoft.front.service.CarActualPriceQueryServiceLocator())
					.getCarActualPriceQueryServiceHttpSoap11Endpoint();
			if (carActualPriceQueryServicePortType != null) {
				if (_endpoint != null)
					((javax.xml.rpc.Stub) carActualPriceQueryServicePortType)
							._setProperty(
									"javax.xml.rpc.service.endpoint.address",
									_endpoint);
				else
					_endpoint = (String) ((javax.xml.rpc.Stub) carActualPriceQueryServicePortType)
							._getProperty("javax.xml.rpc.service.endpoint.address");
			}

		} catch (javax.xml.rpc.ServiceException serviceException) {
		}
	}

	public String getEndpoint() {
		return _endpoint;
	}

	public void setEndpoint(String endpoint) {
		_endpoint = endpoint;
		if (carActualPriceQueryServicePortType != null)
			((javax.xml.rpc.Stub) carActualPriceQueryServicePortType)
					._setProperty("javax.xml.rpc.service.endpoint.address",
							_endpoint);

	}

	public com.sinosoft.front.service.CarActualPriceQueryServicePortType getCarActualPriceQueryServicePortType() {
		if (carActualPriceQueryServicePortType == null)
			_initCarActualPriceQueryServicePortTypeProxy();
		return carActualPriceQueryServicePortType;
	}

	@Override
	public void setCarActualPriceQueryCheckInterface(
			CarActualPriceQueryCheckInterface carActualPriceQueryCheckInterface)
			throws RemoteException {
		// TODO Auto-generated method stub
		// CarActualPriceQueryServicePortType
		if (carActualPriceQueryServicePortType == null)
			// _initCarActualPriceQueryServicePortTypeProxy
			_initCarActualPriceQueryServicePortTypeProxy();
		carActualPriceQueryServicePortType
				.setCarActualPriceQueryCheckInterface(carActualPriceQueryCheckInterface);
		// vehicleModelQueryServicePortType.setVehicleModelQueryCheckInterface(vehicleModelQueryCheckInterface);
	}

	@Override
	public CarActualPriceQueryResponse queryActualPrice(
			CarActualPriceQueryRequest request) throws RemoteException {
		// TODO Auto-generated method stub
		if (carActualPriceQueryServicePortType == null)
			_initCarActualPriceQueryServicePortTypeProxy();
		return carActualPriceQueryServicePortType.queryActualPrice(request);
	}

	@Override
	public void setCarActualPriceQueryInterface(
			CarActualPriceQueryInterface carActualPriceQueryInterface)
			throws RemoteException {
		// TODO Auto-generated method stub
		if (carActualPriceQueryServicePortType == null)
			_initCarActualPriceQueryServicePortTypeProxy();
		carActualPriceQueryServicePortType
				.setCarActualPriceQueryInterface(carActualPriceQueryInterface);
		// vehicleModelQueryServicePortType.setVehicleModelQueryInterface(vehicleModelQueryInterface);

	}

}